package com.guli.gulimall.member.controller;

import com.guli.common.utils.R;
import org.omg.CORBA.INTERNAL;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 高洋
 * @Classname HelloController
 * @Description
 * @Date 2022/4/20 19:10
 */
@RestController
@RequestMapping("/hello")
@RefreshScope
public class HelloController {

    @Value("${person.name}")
    private String name;

    @Value("${person.age}")
    private Integer age;

    @RequestMapping("/getMsg")
    public R getMsg(){
        return R.ok().put("name",name).put("age",age);
    }
}
